package com.zh.admin.order.service.Impl;

import com.zh.admin.order.dao.OrderAdminDao;
import com.zh.admin.order.service.OrderAdminService;
import com.zh.pojo.Orders;
import com.zh.pojo.Products;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderAdminServiceImpl implements OrderAdminService {

    @Autowired
    private OrderAdminDao orderAdminDao;

    @Override
    public List<Orders> selectAllOrders() {
        return orderAdminDao.selectAllOrders();
    }

    @Override
    public Orders selectOrdersById(String id) {
        return orderAdminDao.selectOrdersById(id);
    }

    @Override
    public int insertOrder(Orders orders) {
        return orderAdminDao.insertOrder(orders);
    }

    @Override
    public int deleteOrderById(String id) {
        return orderAdminDao.deleteOrderById(id);
    }

    @Override
    public List<Orders> selectMoreOrders(String id, String receiverName) {
        return orderAdminDao.selectMoreOrders(id,receiverName);
    }

    @Override
    public List<Products> selectOrderAllProducts(String id) {
        return orderAdminDao.selectOrderAllProducts(id);
    }

    @Override
    public int deleteOrdersItemByOrderId(String order_id) {
        return orderAdminDao.deleteOrdersItemByOrderId(order_id);
    }


}
